import request from '@/utils/request'

// 查询后勤活动信息列表
export function listActivity(query) {
  return request({
    url: '/logex/activity/list',
    method: 'get',
    params: query
  })
}

// 查询后勤活动信息详细
export function getActivity(id) {
  return request({
    url: '/logex/activity/' + id,
    method: 'get'
  })
}

// 新增后勤活动信息
export function addActivity(data) {
  return request({
    url: '/logex/activity',
    method: 'post',
    data: data
  })
}

// 修改后勤活动信息
export function updateActivity(data) {
  return request({
    url: '/logex/activity',
    method: 'put',
    data: data
  })
}

export function putDate(data) {
  return request({
    url: '/logex/activity/putDate',
    method: 'put',
    data: data
  })
}

// 删除后勤活动信息
export function delActivity(id) {
  return request({
    url: '/logex/activity/' + id,
    method: 'delete'
  })
}


export function changeStatus(data) {
  return request({
    url: '/logex/activity/changeStatus',
    method: 'put',
    data: data
  })
}

export function addHotelToMatch(data) {
  return request({
    url: '/logex/activityHotel/insertBatch',
    method: 'post',
    data: data
  })
}

export function getMatchHotel(params) {
  params.pageNum = 1
  params.pageSize = 999
  return request({
    url: '/logex/activityHotel/list',
    method: 'get',
    params: params
  })
}

export function delMatchHotel(id) {
  return request({
    url: '/logex/activityHotel/' + id,
    method: 'delete'
  })
}

export function getMiniappQrCode(id) {
  return request({
    url: '/logex/activity/getMiniappQrCode/' + id,
    method: 'get'
  })
}


export function addReceptionToMatch(data) {
  return request({
    url: '/logex/activityVehicle/insertBatch',
    method: 'post',
    data: data
  })
}

export function getMatchReception(params) {
  params.pageNum = 1
  params.pageSize = 999
  return request({
    url: '/logex/activityVehicle/list',
    method: 'get',
    params: params
  })
}

export function delMatchReception(id) {
  return request({
    url: '/logex/activityVehicle/' + id,
    method: 'delete'
  })
}


export function addDiningToMatch(data) {
  return request({
    url: '/logex/activityRestaurant/insertBatch',
    method: 'post',
    data: data
  })
}

export function getMatchDining(params) {
  params.pageNum = 1
  params.pageSize = 999
  return request({
    url: '/logex/activityRestaurant/list',
    method: 'get',
    params: params
  })
}

export function delMatchDining(id) {
  return request({
    url: '/logex/activityRestaurant/' + id,
    method: 'delete'
  })
}
